import java.sql.SQLOutput;
import java.util.Scanner;//main6 导包
public class Test {
    /**
     * @param args 2024.1.31 第三课 运算符完+逻辑控制
     */
    public static void main17(String[] args) {
        Scanner scanner = new Scanner(System.in);

       /* while (scanner.hasNextInt()){
            int a =scanner.nextInt();
            System.out.println(a);
        }*/

        while (scanner.hasNextInt()){
            String a =scanner.nextLine();
            System.out.println(a);
        }
    }
    public static void main16(String[] args) {
        Scanner scanner = new Scanner(System.in);//
        System.out.println("请输入你的姓名：");
        String name = scanner.next();//输入一个字符串 next输入空格就结束了
        System.out.println(name);
    }
    public static void main15(String[] args) {
        Scanner scanner = new Scanner(System.in);//
        System.out.println("请输入你的姓名：");
        String name = scanner.nextLine();//输入一个字符串
        System.out.println(name);

        System.out.println("请输入你的年龄：");
        int age = scanner.nextInt();
        System.out.println(age);

        scanner.nextLine();//把回车收走

        System.out.println("请输入你的工资：");
        float f =scanner.nextFloat();
        System.out.println(f);
    }
    public static void main14(String[] args) {
        System.out.println("输出且换行");
        System.out.print("输出不换行");
        System.out.printf("%s\n","输出");
    }
    public static void main13(String[] args) {
        int i = 0;
        do{
            System.out.println(i);
            i++;
        }while(i != 0);
    }
    public static void main12(String[] args) {
        int sum = 0;
        for(int k = 1;k <= 5;k++){
            int ret = 1;
            for(int i = 1;i <= k;i++){
                ret *= i;
            }
            sum += ret;
        }
        System.out.println(sum);
    }
    public static void main11(String[] args) {
        //找到1-100之间 既能被3整除，也能被5整除的数据
        //要求使用beeak/continue
        int i = 1;
        while(i <= 100){
            if(i % 15 != 0){
                i++;
                continue;
            }
            System.out.println(i);
            i++;
        }
    }
    public static void main10(String[] args) {
        int i = 1;
        while(i <= 10){
            if(i % 3 == 0){
                System.out.println(i);
                //continue;//死循环
                break;
            }
            i++;
        }
    }
    public static void main9(String[] args) {
        int a = 1;
        int sum = 0;
        while ( a <= 100){
            sum += a;
            a++;
        }
        System.out.println(sum);

        //1-100奇数的和
        int sumOdd = 0;
        a = 1;
        while (a <= 100){
            sumOdd += a;
            a += 2;
        }
        System.out.println(sumOdd);

        //1-100偶数的和
        int sumOd = 0;
        a = 2;
        while (a <= 100){
            sumOd += a;
            a += 2;
        }
        System.out.println(sumOd);
    }
    public static void main8(String[] args) {
        int a = 1;
        while ( a <= 10){
            System.out.println(a);
            a++;
        }
    }
    public static void main7(String[] args) {
        int a = 10;
        switch (a) {
            case 2:
                System.out.println(2);
                break;
            case 1:
                System.out.println(1);
                //break
            default:
                System.out.println("输入有误!");
                break;
        }
    }
    public static void main6(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int year = scanner.nextInt();

        if (year % 100 == 0) {
            //判断世纪闰年
            if (year % 400 == 0) {
                System.out.println("是闰年");
            } else {
                System.out.println("不是闰年");
            }
        } else {
            //
            if (year % 4 == 0) {
                System.out.println("是闰年");
            } else {
                System.out.println("不是闰年");
            }
        }
    }

    public static void main5(String[] args) {
        int a=0;
        for(int i =1;i <=100;i++){
            if(i % 10 == 9 ){//判断个位数的9
                a++;
            }
            if(i / 10 == 9){//判断十位数的9
                a++;
            }
        }
        System.out.println(a);
    }

    public static void main4(String[] args) {
        int a = 10;
        if (a % 2 == 0) {
            System.out.println("a 是偶数");
        } else {
            System.out.println("a 是奇数");
        }
    }

    public static void main3(String[] args) {
        System.out.println("aaaa");
        System.out.println("ccc");
        System.out.println("bbbb");

        int a = 10;
        if (a == 10) {
            System.out.println("a==10");
            System.out.println("fFAdsa");
            System.out.println("1111");
        }
    }
    public static void main2(String[] args) {
        boolean flg = true == true ? false ? true : false : true;
        boolean flg2 = true == true ? false ? true : false : true;
        System.out.println(flg2);
    }
    public static void main1(String[] args) {
        System.out.println("\\hello\\");
        System.out.println("\"hello\"");
        System.out.println("\\\"hello\\\"");

        System.out.println(-1 >>> 1);

        //System.out.println(10 > 20 && 10 / 0 == 0);
        //        //System.out.println(10 > 20 // 10 / 0 == 0);
        //        //System.out.println(10 > 20 & 10 / 0 == 0);
        //        //System.out.println(10 > 20 | 10 / 0 == 0);
        //    }
        //}
    }
}